<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="vue.js"></script>
    <style>
        span{
            display: inline-block;
            width: 300px;
        }
    </style>
</head>
<body>
    <!-- <div id="app">
        <button v-on:click='i--'>-</button>
        <span>{{i}}</span>
        <button v-on:click='i++'>+</button>
    </div>
    <script>
      var app=  new Vue({
            el: '#app',
            data: {
               i:0
            }
        });
    </script> -->
    <!-- <div id="app">
        <span v-bind:title="message">鼠标悬停几秒钟查看此处动态绑定的提示信息！</span>
    </div>
    <script>
        var app=new Vue({
            el:'#app',
            data:{
                message:"页面加载于"+new Date().toLocaleString()
            }
        });
    </script> -->
    <!-- <div id="app">
        <p v-if="tt">现在你可以看到我</p>
    </div>
    <script>
        var app=new Vue({
            el:"#app",
            data:{
                tt:true
            }
        });
    </script> -->
    <!-- <div id="app">
        <ul>
            <li v-for="con in plepeo">姓名：{{con.name}}性别：{{con.sex}}</li>
        </ul>
    </div>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                plepeo: [
                    { name: "小王", sex: "男" },
                    { name: "安卓", sex: "男" },
                    { name: "JavaScript", sex: "男" },
                    { name: "Jquery", sex: "男" },
                    { name: "Java", sex: "男" }
                ]
            }
        });
    </script> -->
    <!-- <div id="app">
        <p>{{message}}</p>
        <input type="button" value="消息反转" v-on:click="handle">
    </div>
    <script>
        var app=new Vue({
            el:"#app",
            data:{
                message:"Hello Work!"
            },
            methods: {
                handle:function(){
                    this.message=this.message.split('').reverse().join('');
                }
            },
        })
    </script> -->
    <!-- <div id="app">
        <p>{{ message }}</p>
        <input type="text" v-model="message">
    </div>
    <script>
        var app=new Vue({
            el:"#app",
            data:{
                message:'数据绑定！'
            }
        });
    </script> -->
    <!-- 组件化 -->
    <!-- <div id="app">
        <p-item v-for="item in plepeo" v-bind:todo="item" v-bind:key="item.id"></p-item>
    </div>
    <script>
        Vue.component("p-item",{
            props:['todo'],
            template:'<div><span>姓名:{{todo.name}}</span><span>性别:{{todo.sex}}</span></div>'
        })
        var app=new Vue({
            el:"#app",
            data: {
                plepeo: [
                    { name: "小王", sex: "男" },
                    { name: "安卓", sex: "男" },
                    { name: "JavaScript", sex: "男" },
                    { name: "Jquery", sex: "男" },
                    { name: "Java", sex: "男" }
                ]
            }
        })
    </script> -->
    <div id="app">
        <p v-html="html">12311111111</p>
    </div>
    <script>
        var app=new Vue({
            el:"#app",
            data:{
                html:"<a href='a.html'>黑马程序员</a>"
            }
        })
    </script>
</body>
</html>